package algorithms.que13;

/**
 * @功能
 * @创建时间 2020/7/2
 */
public class FixedCapacityStackOfString {
    private String[] a;
    private int N;
    public FixedCapacityStackOfString(int cap){
        a = new String[cap];
    }
    public boolean isEmpty(){
        return N == 0;
    }
    public int size(){
        return N;
    }
    public void push(String item){
        a[N++] = item;
    }
    public String pop(){
        return a[N--];
    }
    public boolean isFull(){
        if(a.length==N)
            return true;
        return false;
    }
}
